# Maintainer: Sergej Pupykin <arch+pub@sergej.pp.ru>
# Previous Maintainer: Dirk Langer <dirk.langer@vvovgonik.de>

pkgname='perl-string-util'
pkgver=1.34
pkgrel=2
pkgdesc="String processing utilities"
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl-number-misc')
makedepends=('perl-module-build-tiny')
url='https://metacpan.org/release/String-Util'
source=("https://cpan.metacpan.org/authors/id/B/BA/BAKERSCOT/String-Util-$pkgver.tar.gz")
md5sums=('6edd45bbf5f88587120de87b8cf92671')
sha512sums=('ab4ee4a8da9fd909a6d51a2e96eeea4ea50cf1e6eb741271aa6dc1d1d5fc8f1208f526059c6f774d4890f1a9b0f57e01c59d6f0380fe13382c54d7028e7c0ea1')
_distdir="String-Util-$pkgver"

build() {
  cd String-Util-$pkgver
  unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
  export PERL_MM_USE_DEFAULT=1 MODULEBUILDRC=/dev/null
  perl Build.PL
  ./Build
}

package() {
  cd String-Util-$pkgver
  unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
  ./Build install --installdirs=vendor --destdir="$pkgdir"
  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}
